Security Verified
Browse Categories
 Affiliates
 Backup & Restore
 Billing & MyAccount FAQs
 Control Panels
 Customer Tools
 Databases
 Dedicated Servers
 DNS and Domain Registration
 Email
 Glossary
 Network
 News
 PCI Compliance
 Postmaster
 Pre-sales FAQ
 Publishing Your Site
 Reseller Tips
 Search Engine Optimization
 Security Topics
 SSL and HTTPS
 Support: Getting Help
 Virtual Desktops
 Virtual Servers
 Website Design & Development
 Website Errors

DotNetNuke Hosting
SQL 2008 R2 / IIS 7.5 Hosting
WordPress Hosting
Forex Trader Hosting
Personal Desktop Hosting

$_SERVER['DOCUMENT_ROOT'] doesn't work on IIS

Article ID: 204

 Back to Search

This variable may not be present in IIS. Try the below work-around.

$DOCUMENT_ROOT = substr($_SERVER['PATH_TRANSLATED'],0,strlen($_SERVER['SCRIPT_NAME']) * - 1);
print($DOCUMENT_ROOT);

 

 
Downloads Associated With This Article
No downloads are currently associated with this article.

© 2001 - 2012 3Essentials Inc.
Terms Of Service | Privacy Policy | Copyright Policy | Affiliates